package com.example.springboot3demo.config;

import com.example.springboot3demo.google.oauth.OAuthGoogleClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class OAuthGoogleConfig {
    @Value("${oauth2.google.client.id}")
    private String oauthGoogleClientId;
    @Value("${oauth2.google.client.secret}")
    private String oauthGoogleClientSecret;
    @Value("${oauth2.google.redirect.uri}")
    private String oauthGoogleRedirectURI;


    @Bean
    public OAuthGoogleClient oAuthGoogleClient() {
        return new OAuthGoogleClient(oauthGoogleClientId, oauthGoogleClientSecret,
                oauthGoogleRedirectURI, true, "127.0.0.1", 7890);
    }
}
